// Directions
// Create a Widget we want to tap
// Wrap it in an InkWell Widget to manage tap callbacks and ripple animations

import 'package:flutter/material.dart';

class AddingMaterialTouchRipplesDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Adding Material Touch Ripples Demo'),
      ),
      body: ListView(
        children: <Widget>[
          // 2. Use a TextEditingController
          MyButton(),
        ],
      ),
    );
  }
}

class MyButton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // The InkWell Wraps our custom flat button Widget
    return InkWell(
      // When the user taps the button, show a snackbar
      onTap: () {
        Scaffold.of(context).showSnackBar(SnackBar(
          content: Text('Tap'),
        ));
      },
      child: Container(
        padding: EdgeInsets.all(12.0),
        child: Text('Flat Button'),
      ),
      splashColor: Colors.blue,
      // highlightColor: Colors.gr,
    );
  }
}